#pragma once
#include "ZuiLib.h"
#include "LRefObject.h"

namespace ZuiLib {

class LSlider :public LRefObject<ZSlider>
{
public:

	int getChangeStep(LuaFuncState& L)
	{
		return L.lreturn(pThis->GetChangeStep());
	}

	int setChangeStep(LuaFuncState& L)
	{
		pThis->SetChangeStep(L.arg(0).toInt());
		return 0;
	}

	int setThumbSize(LuaFuncState& L)
	{
		pThis->SetThumbSize(toSize(L.arg(0)));
		return 0;
	}

	int getThumbRect(LuaFuncState& L)
	{
		return L.lreturn(toLua(&L,pThis->GetThumbRect()));
	}

	int getThumbImage(LuaFuncState& L)
	{
		return L.lreturn(pThis->GetThumbImage());
	}

	int setThumbImage(LuaFuncState& L)
	{
		pThis->SetThumbImage(L.arg(0).toString());
		return 0;
	}

	int getThumbHotImage(LuaFuncState& L)
	{
		return L.lreturn(pThis->GetThumbHotImage());
	}

	int setThumbHotImage(LuaFuncState& L)
	{
		pThis->SetThumbHotImage(L.arg(0).toString());
		return 0;
	}
	int getThumbPushedImage(LuaFuncState& L)
	{
		return L.lreturn(pThis->GetThumbPushedImage());
	}

	int setThumbPushedImage(LuaFuncState& L)
	{
		pThis->SetThumbPushedImage(L.arg(0).toString());
		return 0;
	}

	BEGIN_MAP_FUNC(LSlider)
	DECLARE_FUNC(getChangeStep),
	DECLARE_FUNC(setChangeStep),
	DECLARE_FUNC(setThumbSize),
	DECLARE_FUNC(getThumbRect),
	DECLARE_FUNC(getThumbImage),
	DECLARE_FUNC(setThumbImage),
	DECLARE_FUNC(getThumbHotImage),
	DECLARE_FUNC(setThumbHotImage),
	DECLARE_FUNC(getThumbPushedImage),
	DECLARE_FUNC(setThumbPushedImage),
	END_MAP_FUNC
};

}//namespace

